package sniff.pack;

public class MyHTTPResponsePacket extends MyHTTPPacket {
	protected String statusCode;
	protected String responsePhrase;

	public MyHTTPResponsePacket() {

	}

	public MyHTTPResponsePacket(String headLine,String httpVersion,String statusCode, String responsePhrase) {
		super(headLine, httpVersion);
		this.statusCode = statusCode;
		this.responsePhrase = responsePhrase;
	}

	public String getStatusCode() {
		return statusCode;
	}

	public void setStatusCode(String statusCode) {
		this.statusCode = statusCode;
	}

	public String getResponsePhrase() {
		return responsePhrase;
	}

	public void setResponsePhrase(String responsePhrase) {
		this.responsePhrase = responsePhrase;
	}
	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("Http Version:"+this.httpVersion+"\n");
		sb.append("Status Code:"+this.statusCode+"\n");
		sb.append("Response Phrase:"+this.responsePhrase+"\n");
		sb.append(this.headLine+"\n");
		return sb.toString();
	}
}
